<header class="header" id="header">
    <div class="logo">API管理系统</div>
    <div class="switchMenu" @click="switchMenu">
        <i class="fa fa-bars" aria-hidden="true"></i>
    </div>
    <div class="bigMenu"></div>
    <div class="settings">
        <el-dropdown>
            <span class="el-dropdown-link"><%=locals.username%>
                <i class="el-icon-arrow-down el-icon--right"></i>
            </span>
            <el-dropdown-menu slot="dropdown">
                <el-dropdown-item>设置</el-dropdown-item>
                <el-dropdown-item><span @click="dialogFormVisible=true">修改密码</span></el-dropdown-item>
                <el-dropdown-item><a href="/logout">退出登录</a></el-dropdown-item>
            </el-dropdown-menu>
        </el-dropdown>
        <el-dialog title="修改密码" :visible.sync="dialogFormVisible" append-to-body :close-on-click-modal="false">
            <el-form :model="user" :rules="rules" ref="user" status-icon>
                <el-form-item label="原密码" label-width="80px" prop="oldpwd">
                    <el-input auto-complete="off" v-model="user.oldpwd" type="password"></el-input>
                </el-form-item>
                <el-form-item label="新密码"  label-width="80px" prop="newpwd">
                    <el-input auto-complete="off" v-model="user.newpwd" type="password" placeholder="请输入4-16位数字或字母"></el-input>
                </el-form-item>
                <el-form-item label="确认密码"  label-width="80px" prop="surepwd">
                    <el-input auto-complete="off" v-model="user.surepwd" type="password"></el-input>
                </el-form-item>
            </el-form>
            <div slot="footer" class="dialog-footer">
                <el-button @click="resetForm('user')">取 消</el-button>
                <el-button type="primary"   @click="handleClose('user')">确 定</el-button>
            </div>
        </el-dialog>
    </div>
</header>